<extend name="Public/base"/>
<block name="content">
<block name="content">
	<h3>采集管理</h3>
	<div class="panel panel-default">
		<div class="panel-heading"><if condition="$_GET['_action'] eq 'add'">新增<else/>编辑</if>采集规则</div>
		<div class="panel-body">
			<!-- 表单 -->
			<form id="form" action="<{:addons_url('Collect://Collect/update')}>" method="post" class="form-horizontal">
				<!-- 基础文档模型 -->
				<div id="tab1" class="tab-pane in tab1">
					<div class="form-group">
						<label class="col-sm-2 control-label">规则名称</label>
						<div class="col-sm-3">
							<input type="text" class="text form-control" name="rule_name" value="<{$rule.rule_name|default=""}>">
						</div>
						<span class="check-tips">如： xxx 中文舞曲</span>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">分页链接规则</label>
						<div class="col-sm-5">
							<input type="text" class="text form-control" name="page_rule" value="<{$rule.page_rule|default=""}>">
						</div>
						<span class="check-tips">采集的分类分页规则:  <br>xxx{$id}xxx</span>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">起始分页id</label>
						<div class="col-sm-2">
							<input type="text" class="text form-control" name="first_page_id" value="<{$rule.first_page_id|default="1"}>">
						</div>
						<label class="col-sm-1 control-label">结束分页id</label>
						<div class="col-sm-2">
							<input type="text" class="text form-control" name="last_page_id" value="<{$rule.last_page_id|default="1"}>">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">列表包裹容器规则</label>
						<div class="col-sm-6">
							<textarea style="width:460px;height:50px;" name="link_wrap_rule"><{$rule.link_wrap_rule|default=""}></textarea>
						</div>
						<span class="check-tips">列表包裹容器规则：<br>开始标示  @  结束标示</span>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">单曲页链接规则</label>
						<div class="col-sm-6">
							<textarea style="width:460px;height:50px;" name="link_rule"><{$rule.link_rule|default=""}></textarea>
						</div>
						<span class="check-tips">获取单曲页链接规则：<br>开始标示  @  结束标示</span>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">单曲页音乐名称规则</label>
						<div class="col-sm-6">
							<textarea style="width:460px;height:50px;" name="title_rule"><{$rule.title_rule|default=""}></textarea>
						</div>
						<span class="check-tips">请填写单曲页播放地址规则：<br>开始标示  @  结束标示</span>
					</div>
														
					<div class="form-group">
						<label class="col-sm-2 control-label">单曲页播放地址规则</label>
						<div class="col-sm-6">
							<textarea style="width:460px;height:50px;" name="play_rule"><{$rule.play_rule|default=""}></textarea>
						</div>
						<span class="check-tips">请填写播放地址规则：<br>开始标示  @  结束标示</span>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">单曲页播放地址规则2</label>
						<div class="col-sm-6">
							<textarea style="width:460px;height:50px;" name="play_rule2"><{$rule.play_rule2|default=""}></textarea>
						</div>
						<span class="check-tips">请填写播放地址规则2：<br>开始标示  @  结束标示 可为空</span>
					</div>						
				
					<div class="form-group">	
						<label class="col-sm-2 control-label">所属服务器</label>
						<div class="col-sm-9">
							<select name="server_id" class="form-control">
							<option value="0">无服务器</option>
			        		<volist name="server" id="server">	        			
			            		<option value="<{$server['id']}>" <eq name = "server['id']" value="$rule['server_id']"> selected</eq> ><{$server['name']}></option>
			        		</volist>
							</select>
						</div>	
					</div> 
					
					<input type="hidden" name="id" value="<{$rule.id|default=""}>"/>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-2">
							<input class="btn submit-btn btn-primary" type="submit" value="确 定" />
							<input class="btn btn-return" type="reset" value="重置" />
						</div>
					</div>
				
				</div>												
			</form>
		</div>
	</div>
</block>
<script type="text/javascript">
/*$(document).ready(function() {

});*/
</script>
</block>

